package com.umeox.moto.watch.themes.skin.entity;

import android.view.View;

import com.umeox.moto.watch.themes.skin.loader.ResourceManager;
import com.umeox.moto.watch.themes.widget.AnalogClock;


public class AnalogClockAttr extends SkinAttr {

	@Override
	public void apply(View view) {
        if (view instanceof AnalogClock) {
            AnalogClock analogClock = (AnalogClock) view;
            if (RES_TYPE_NAME_DRAWABLE.equals(attrValueTypeName)) {
                if (AttrFactory.HOUR_HAND.equals(attrName)) {
                    analogClock.setHourHand(ResourceManager.getInstance().getDrawable(attrValueRefId));
                } else if (AttrFactory.MINUTE_HAND.equals(attrName)) {
                    analogClock.setMinuteHand(ResourceManager.getInstance().getDrawable(attrValueRefId));
                } else if (AttrFactory.NAIL_ICON.equals(attrName)) {
                    analogClock.setNail(ResourceManager.getInstance().getDrawable(attrValueRefId));
                }
            }
        }
	}
}
